package y24.m3.lanqiao14;

import java.math.BigInteger;

public class Test1 {
    public static void main(String[] args) {
        BigInteger sum = BigInteger.valueOf(0);
        for (int i = 1; i < 2023; i++) {
            BigInteger num = BigInteger.valueOf(1);
            for (int j = 1; j <= i; j++){
                num = num.multiply(BigInteger.valueOf(j));
            }
            sum = sum.add(num);
        }
        System.out.println(sum);
    }
    //420940313
}
